﻿<local:DocumentBase x:Class="WPFExcelReport.YCAEK02LIST"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                    FontSize="16"
                    Loaded="Window_Loaded"
                    Background="White"
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="Set4ITX" />
        <db:SETINTEXDB  x:Key="Set4ITX2" />
        <db:SETINTEXDB  x:Key="SetEnv" />
        <CollectionViewSource   x:Key="vwLIEFDAT" Source="{Binding Path=LIEFDAT,Source={StaticResource SetEnv}}" />
        <CollectionViewSource   x:Key="vwSECTION" Source="{Binding Path=ICC_SECTION,Source={StaticResource SetEnv}}" />
        <CollectionViewSource   x:Key="vwEKKOPF" Source="{Binding Path=EKKOPF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwEKPOS" Source="{Binding Path=EKPOS,Source={StaticResource Set4ITX}}" />
        <CollectionViewSource   x:Key="vwEKPOS2" Source="{Binding Path=EKPOS,Source={StaticResource Set4ITX2}}" />
        <CollectionViewSource   x:Key="vwWASTAMM" Source="{Binding Path=WASTAMM,Source={StaticResource Set4ITX}}" />
    </local:DocumentBase.Resources>
    <Grid   >
        <TabControl>
            <TabItem Header="供应商季节" >
                <Grid   >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="600" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"></ColumnDefinition>
                        <ColumnDefinition Width="1000"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                        <WrapPanel>
                            <Button FontSize="18" Content="查询"  BorderBrush="Yellow" Margin="20,0,0,0" Click="btnQuery_Click" Height="40" Width="40">    
                                  
                            </Button>
                            <TextBlock VerticalAlignment="Center">供应商</TextBlock>
                            <ComboBox  ItemsSource="{Binding Source={StaticResource ResourceKey=vwLIEFDAT}}"
                                       Margin="20,0,0,0"
                                       Background="Gray"  MinWidth="100" 
                                       DisplayMemberPath="LSLIEFNA"
                                       IsEditable="True"
                                       SelectedValuePath="LSLIEFNR"
                                       >
                            </ComboBox>
                            <TextBlock FontSize="18" VerticalAlignment="Center">年份</TextBlock>
                            <TextBox FontSize="18" Name="txtYear" VerticalAlignment="Center">2014</TextBox>
                            <TextBlock VerticalAlignment="Center">波段</TextBlock>
                            <ComboBox Width="100" Name="cbSECTION"
                          DisplayMemberPath="SDDATEN"
                          SelectedValuePath="SDKEY"
                          SelectionChanged="cbSECTION_SelectionChanged"
                         ItemsSource="{Binding Source={StaticResource ResourceKey=vwSECTION}}"  
                          ></ComboBox>
                            <TextBox Name="txtSection" Width="220" FontSize="18" Background="Beige" CharacterCasing="Upper" ></TextBox>                            
                            <Button FontSize="18" Content="筛选"  BorderBrush="Yellow" Margin="20,0,0,0" Click="btnFilterEK0201_Click" Height="40" Width="40"/>
                            <Button FontSize="18" Content="清除"  BorderBrush="Yellow" Margin="20,0,0,0" Click="btnFilterEK0201Clear_Click" Height="40" Width="40"/>
                            <Button Content="预览"  FontSize="18"   BorderBrush="Yellow" Margin="20,0,0,0"  Width="Auto" Click="btnPrintPreview_Click"/>
                        </WrapPanel>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
                        <DataGrid CanUserReorderColumns="True"  
                                  Name="dlgEK0201"
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="False"  
                              RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwEKPOS}}"  
                                  MaxHeight="600"
                              Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2">
                            <DataGrid.Columns>
                                <DataGridTextColumn Header="供应商" Binding="{Binding LSLIEFNA}" Width="Auto"/>
                                <DataGridTextColumn Header="年份" Binding="{Binding FSKOLL}" Width="Auto"/>
                                <DataGridTextColumn Header="季节" Binding="{Binding FSARTPRGR}" Width="Auto"/>
                                <DataGridTextColumn Header="数量" Binding="{Binding EKPME1}" Width="Auto"/>
                                <DataGridTextColumn Header="单位" Binding="{Binding EKPMEEH}" Width="Auto"/>
                                <DataGridTextColumn Header="总金额" Binding="{Binding Path=EKPWE1}" Width="Auto"/>
                            </DataGrid.Columns>
                        </DataGrid  >
                    </StackPanel>
                </Grid   >
            </TabItem>
            <TabItem Header="款式采购">
                <Grid   >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="1*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="28.343"></ColumnDefinition>
                        <ColumnDefinition Width="171.657"/>
                        <ColumnDefinition Width="1000"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
                        <WrapPanel>
                            <Button FontSize="18" Content="查询"  BorderBrush="Yellow" Margin="20,0,0,0" Click="btnQuery1_Click" Height="40" Width="40"></Button>
                            <TextBlock FontSize="18" VerticalAlignment="Center">年份</TextBlock>
                            <TextBox FontSize="18" Name="txtSYear" VerticalAlignment="Center">2014</TextBox>
                            <TextBlock FontSize="18" VerticalAlignment="Center">款式</TextBlock>
                            <TextBox Name="txtArt" Width="220" FontSize="18" Background="Beige" CharacterCasing="Upper" ></TextBox>
                            <TextBlock FontSize="18" VerticalAlignment="Center">面料</TextBlock>
                            <TextBox Name="txtFArt" Width="220" FontSize="18" Background="Yellow" CharacterCasing="Upper" ></TextBox>
                            <Button FontSize="18" Content="筛选"  BorderBrush="Yellow" Margin="20,0,0,0" Click="btnFilterEK0202_Click" Height="40" Width="40"/>
                            <Button FontSize="18" Content="清除"  BorderBrush="Yellow" Margin="20,0,0,0" Click="btnFilterEK0202Clear_Click" Height="40" Width="40"/>
                            <Button Content="预览"  FontSize="18"   BorderBrush="Yellow" Margin="20,0,0,0"    Width="Auto" Click="btnPrintPreview1_Click"/>
                        </WrapPanel>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3">
                        <DataGrid CanUserReorderColumns="True"  
                                  Name="dlgEK0202"
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  
                                  MaxHeight="600"
                                  FontSize="12"
                              RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwEKPOS2}}"  
                              Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2">
                            <DataGrid.Columns>
                                <DataGridTextColumn Header="供应商" Binding="{Binding LSNAME1}" Width="Auto"/>
                                <DataGridTextColumn Header="款号" Binding="{Binding ABPART}" Width="Auto"/>
                                <DataGridTextColumn Header="款式" Binding="{Binding FSABEZ}" Width="Auto"/>                    
                                <DataGridTextColumn Header="颜色" Binding="{Binding ABPFARBE}" Width="Auto"/>
                                <DataGridTextColumn Header="颜色" Binding="{Binding FSFFBEZ}" Width="Auto"/>
                                <DataGridTextColumn Header="供应商编号" Binding="{Binding EXART}" Width="Auto"/>
                                <DataGridTextColumn Header="色号" Binding="{Binding EXCOLOR}" Width="Auto"/>
                                <DataGridTextColumn Header="原料" Binding="{Binding ABAART}" Width="Auto"/>
                                <DataGridTextColumn Header="色号" Binding="{Binding ABAFARBE}" Width="Auto"/>
                                <DataGridTextColumn Header="尺寸" Binding="{Binding ABAGROE}" Width="Auto"/>
                                <DataGridTextColumn Header="" Binding="{Binding Path=ABAAUFKRS}" Width="Auto"/>
                                <DataGridTextColumn Header="采购单" Binding="{Binding Path=ABAAUFLFD}" Width="Auto"/>
                                <DataGridTextColumn Header="" Binding="{Binding Path=ABAAUFPOS}" Width="Auto"/>
                                <DataGridTextColumn Header="需求数量" Binding="{Binding Path=ABARESMG}" Width="Auto"/>
                                <DataGridTextColumn Header="计划用量" Binding="{Binding Path=ABAQTYRESERVE}" Width="Auto"/>
                            </DataGrid.Columns>
                        </DataGrid  >
                    </StackPanel>
                </Grid   >
            </TabItem>
        </TabControl> 
    </Grid>
</local:DocumentBase>
